
var FactoryItem = require("FactoryItem");
const ADSdk = require("ADSdk");
cc.Class({
    extends: require("BasePopUI"),

    properties: {
        BtnClose: cc.Node,
        BtnEnter:cc.Node,
        BtnVideo:cc.Node,
    },

    onLoad()
    {
        this._super();
        this.childrenRankCom = cc.find("wx").getComponent("ChildrenRank");
    },

    Show()
    {

    },

    OpenApp()
    {
   
    },

    Close()
    {
        this.node.active = false;
        this.Mask.active = false;
        if(this.NotNeedReward != null)
        {

        }
    },


    BtnVideoClick() {
        // TODO 广告 视频
        ADSdk.showVideo(null, (result) => {
            if (result == 1) {
                this.BtnClose.active = false;
                this.BtnEnter.active = true;
                this.BtnVideo.active = false;
            }
        })
    },

    BtnEnterClick()
    {
        this.Close();
        FactoryItem.Instance.DestorySameColorProps();
    },

});
